<?php

namespace CMS\Page\Models;
/**
 * Trida entity pro tabulku obsahu stranek a jejich adres (content). 
 *
 * @author David Dusek
 */
use Doctrine\ORM\Mapping as ORM;

/** 
 * @ORM\Entity(repositoryClass="\CMS\Page\Models\ContentRepository")
 * @ORM\Table(name="page_content")
 */
class Content extends \Nette\Object {
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue
     * @var int 
     */
    private $id;

    /**
     * @ORM\Column(length=100)
     * @var string 
     */
    private $module;    
    
     /**
     * @ORM\Column(name="content_id", type="integer")
     * @var int 
     */
    private $contentId;
    
    /**
     * @ORM\Column(length=255)
     * @var string 
     */
    private $address;
    
    /**
     * @ORM\Column(type="boolean")
     * @var boolean 
     */
    private $homepage = 0;   
    
    /**
     * @ORM\Column(type="boolean")
     * @var boolean 
     */
    private $active = 0;       
    
    public function getId() {
        return $this->id;
    }
    
    public function setModule($module) {
        $this->module = $module; 
    }

    public function getModule() {
        return $this->module;
    }

    public function setContentId($contentId) {
        $this->contentId = $contentId; 
    }

    public function getContentId() {
        return (int) $this->contentId;
    }
    
    public function setAddress($address) {
        $this->address = $address; 
    }

    public function getAddress() {
        return $this->address;
    }

    public function setHomepage($homepage) {
        $this->homepage = $homepage; 
    }

    public function getHomepage() {
        return (boolean) $this->homepage;
    }

    public function setActive($active) {
        $this->active = $active; 
    }

    public function getActive() {
        return (boolean) $this->active;
    }
}
